package com.ccx.demo.captcha.Cache;

import com.ccx.demo.captcha.entity.ImgResult;
import com.ccx.demo.service.CaptchaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class captchaCache {


    @Autowired
    private CaptchaService captchaService;

    public boolean setEx(String UUID,String code){
        ImgResult result = new ImgResult();
        result.setImgUUID(UUID);
        result.setImg("base64");
        result.setCode(code);
        return captchaService.addCaptcha(result);
    }
}
